/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * kubernetes 集群
 * kubernetes 集群服务
 *
 * OpenAPI spec version: v1
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using JDCloudSDK.Core.Auth;
using JDCloudSDK.Core.Client;
using JDCloudSDK.Core.Http;
using JDCloudSDK.Kubernetes.Apis;
using JDCloudSDK.Kubernetes.Model;
using System;
using System.Collections.Generic;
using System.Text;
#if NET40||NET35
#else
using System.Threading.Tasks;
#endif

namespace JDCloudSDK.Kubernetes.Client
{
    /// <summary>
    ///  kubernetes 集群
    ///  kubernetes 集群服务
    ///  Kubernetes Api 客户端
    ///</summary>
    public class KubernetesClient : JdcloudClient
    {

        /// <summary>
        ///  默认私有构造函数
        /// </summary>
        private KubernetesClient()
        {

        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="environment">sdk 环境配置信息</param>
        public KubernetesClient(CredentialsProvider credentialsProvider, HttpRequestConfig httpRequestConfig,SDKEnvironment environment)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
            this.environment = environment;
        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="credentialsProvider">认证信息</param>
        public KubernetesClient(CredentialsProvider credentialsProvider,HttpRequestConfig httpRequestConfig)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        /// 默认构造函数，
        /// 注意如果使用此方法 httpRequestConfig 使用的http 请求 schema 为Https
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        public KubernetesClient(CredentialsProvider credentialsProvider)
        {
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        ///  版本号 1.2.0
        ///</summary>
        public const string ClientVersion = "1.2.0";

        private const string apiVersion = "v1";
        private const string userAgentPrefix = "JdcloudSdkDotNet";
        private const string defaultEndpoint = "kubernetes.jdcloud-api.com";
        private const string serviceName = "kubernetes";
        private const string userAgent = userAgentPrefix + "/" + ClientVersion + " " + serviceName + "/" + apiVersion;


        private SDKEnvironment environment = new SDKEnvironment(defaultEndpoint);
        private CredentialsProvider credentialsProvider;
        private HttpRequestConfig httpRequestConfig;

        /// <summary>
        ///  获取证书信息
        ///</summary>
        public override CredentialsProvider CredentialsProvider   { get { return credentialsProvider; } }

        /// <summary>
        ///  获取http 客户端配置信息
        ///</summary>
        public override HttpRequestConfig HttpRequestConfig { get { return httpRequestConfig; } }

        /// <summary>
        ///  获取sdk环境配置信息
        ///</summary>
        public override SDKEnvironment SDKEnvironment { get { return environment; } }

        /// <summary>
        ///  获取用户自定义浏览器识别字符串
        ///</summary>
        public override string UserAgent { get { return userAgent; } }

        /// <summary>
        ///  获取服务名称
        ///</summary>
        public override string ServiceName { get { return serviceName; } }

        /// <summary>
        ///  获取版本号
        ///</summary>
        public override string Version { get { return apiVersion; } }



#if NET40||NET35
        /// <summary>
        ///  集群摘除工作节点组并删除工作节点组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteNodeGroupResponse DeleteNodeGroup(DeleteNodeGroupRequest request) {
            return  new DeleteNodeGroupExecutor().Client(this).Execute<DeleteNodeGroupResponse, DeleteNodeGroupResult, DeleteNodeGroupRequest>(request);
        }
#else
        /// <summary>
        ///  集群摘除工作节点组并删除工作节点组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteNodeGroupResponse> DeleteNodeGroup(DeleteNodeGroupRequest request) {
            return await new DeleteNodeGroupExecutor().Client(this).Execute<DeleteNodeGroupResponse, DeleteNodeGroupResult, DeleteNodeGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  从工作节点组中删除指定实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteNodeInstancesResponse DeleteNodeInstances(DeleteNodeInstancesRequest request) {
            return  new DeleteNodeInstancesExecutor().Client(this).Execute<DeleteNodeInstancesResponse, DeleteNodeInstancesResult, DeleteNodeInstancesRequest>(request);
        }
#else
        /// <summary>
        ///  从工作节点组中删除指定实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteNodeInstancesResponse> DeleteNodeInstances(DeleteNodeInstancesRequest request) {
            return await new DeleteNodeInstancesExecutor().Client(this).Execute<DeleteNodeInstancesResponse, DeleteNodeInstancesResult, DeleteNodeInstancesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询工作节点组列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeNodeGroupsResponse DescribeNodeGroups(DescribeNodeGroupsRequest request) {
            return  new DescribeNodeGroupsExecutor().Client(this).Execute<DescribeNodeGroupsResponse, DescribeNodeGroupsResult, DescribeNodeGroupsRequest>(request);
        }
#else
        /// <summary>
        ///  查询工作节点组列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeNodeGroupsResponse> DescribeNodeGroups(DescribeNodeGroupsRequest request) {
            return await new DescribeNodeGroupsExecutor().Client(this).Execute<DescribeNodeGroupsResponse, DescribeNodeGroupsResult, DescribeNodeGroupsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询可升级的节点版本
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeUpgradableNodeVersionsResponse DescribeUpgradableNodeVersions(DescribeUpgradableNodeVersionsRequest request) {
            return  new DescribeUpgradableNodeVersionsExecutor().Client(this).Execute<DescribeUpgradableNodeVersionsResponse, DescribeUpgradableNodeVersionsResult, DescribeUpgradableNodeVersionsRequest>(request);
        }
#else
        /// <summary>
        ///  查询可升级的节点版本
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeUpgradableNodeVersionsResponse> DescribeUpgradableNodeVersions(DescribeUpgradableNodeVersionsRequest request) {
            return await new DescribeUpgradableNodeVersionsExecutor().Client(this).Execute<DescribeUpgradableNodeVersionsResponse, DescribeUpgradableNodeVersionsResult, DescribeUpgradableNodeVersionsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改集群的网络配置，仅支持 pod 子网更新
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateClusterNetworkDetailResponse UpdateClusterNetworkDetail(UpdateClusterNetworkDetailRequest request) {
            return  new UpdateClusterNetworkDetailExecutor().Client(this).Execute<UpdateClusterNetworkDetailResponse, UpdateClusterNetworkDetailResult, UpdateClusterNetworkDetailRequest>(request);
        }
#else
        /// <summary>
        ///  修改集群的网络配置，仅支持 pod 子网更新
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateClusterNetworkDetailResponse> UpdateClusterNetworkDetail(UpdateClusterNetworkDetailRequest request) {
            return await new UpdateClusterNetworkDetailExecutor().Client(this).Execute<UpdateClusterNetworkDetailResponse, UpdateClusterNetworkDetailResult, UpdateClusterNetworkDetailRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  设置集群组件
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SetAddonsResponse SetAddons(SetAddonsRequest request) {
            return  new SetAddonsExecutor().Client(this).Execute<SetAddonsResponse, SetAddonsResult, SetAddonsRequest>(request);
        }
#else
        /// <summary>
        ///  设置集群组件
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SetAddonsResponse> SetAddons(SetAddonsRequest request) {
            return await new SetAddonsExecutor().Client(this).Execute<SetAddonsResponse, SetAddonsResult, SetAddonsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建工作节点组&lt;br&gt;
        /// - 要求集群状态为running
        /// 
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateNodeGroupResponse CreateNodeGroup(CreateNodeGroupRequest request) {
            return  new CreateNodeGroupExecutor().Client(this).Execute<CreateNodeGroupResponse, CreateNodeGroupResult, CreateNodeGroupRequest>(request);
        }
#else
        /// <summary>
        ///  创建工作节点组&lt;br&gt;
        /// - 要求集群状态为running
        /// 
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateNodeGroupResponse> CreateNodeGroup(CreateNodeGroupRequest request) {
            return await new CreateNodeGroupExecutor().Client(this).Execute<CreateNodeGroupResponse, CreateNodeGroupResult, CreateNodeGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除集群，以及集群的所有node节点，网络，云盘等所有资源。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteClusterResponse DeleteCluster(DeleteClusterRequest request) {
            return  new DeleteClusterExecutor().Client(this).Execute<DeleteClusterResponse, DeleteClusterResult, DeleteClusterRequest>(request);
        }
#else
        /// <summary>
        ///  删除集群，以及集群的所有node节点，网络，云盘等所有资源。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteClusterResponse> DeleteCluster(DeleteClusterRequest request) {
            return await new DeleteClusterExecutor().Client(this).Execute<DeleteClusterResponse, DeleteClusterResult, DeleteClusterRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改工作节点组的 名称 和 描述&lt;br&gt;name 和 description 必须要指定一个
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyNodeGroupResponse ModifyNodeGroup(ModifyNodeGroupRequest request) {
            return  new ModifyNodeGroupExecutor().Client(this).Execute<ModifyNodeGroupResponse, ModifyNodeGroupResult, ModifyNodeGroupRequest>(request);
        }
#else
        /// <summary>
        ///  修改工作节点组的 名称 和 描述&lt;br&gt;name 和 description 必须要指定一个
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyNodeGroupResponse> ModifyNodeGroup(ModifyNodeGroupRequest request) {
            return await new ModifyNodeGroupExecutor().Client(this).Execute<ModifyNodeGroupResponse, ModifyNodeGroupResult, ModifyNodeGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  Deprecated 建议使用 setAddons 接口 &lt;br&gt;设置用户自定义监控状态
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SetUserMetricsResponse SetUserMetrics(SetUserMetricsRequest request) {
            return  new SetUserMetricsExecutor().Client(this).Execute<SetUserMetricsResponse, SetUserMetricsResult, SetUserMetricsRequest>(request);
        }
#else
        /// <summary>
        ///  Deprecated 建议使用 setAddons 接口 &lt;br&gt;设置用户自定义监控状态
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SetUserMetricsResponse> SetUserMetrics(SetUserMetricsRequest request) {
            return await new SetUserMetricsExecutor().Client(this).Execute<SetUserMetricsResponse, SetUserMetricsResult, SetUserMetricsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  调整工作节点组实例数量
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SetNodeGroupSizeResponse SetNodeGroupSize(SetNodeGroupSizeRequest request) {
            return  new SetNodeGroupSizeExecutor().Client(this).Execute<SetNodeGroupSizeResponse, SetNodeGroupSizeResult, SetNodeGroupSizeRequest>(request);
        }
#else
        /// <summary>
        ///  调整工作节点组实例数量
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SetNodeGroupSizeResponse> SetNodeGroupSize(SetNodeGroupSizeRequest request) {
            return await new SetNodeGroupSizeExecutor().Client(this).Execute<SetNodeGroupSizeResponse, SetNodeGroupSizeResult, SetNodeGroupSizeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询 kubernetes 集群服务配置信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeServerConfigResponse DescribeServerConfig(DescribeServerConfigRequest request) {
            return  new DescribeServerConfigExecutor().Client(this).Execute<DescribeServerConfigResponse, DescribeServerConfigResult, DescribeServerConfigRequest>(request);
        }
#else
        /// <summary>
        ///  查询 kubernetes 集群服务配置信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeServerConfigResponse> DescribeServerConfig(DescribeServerConfigRequest request) {
            return await new DescribeServerConfigExecutor().Client(this).Execute<DescribeServerConfigResponse, DescribeServerConfigResult, DescribeServerConfigRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  触发升级
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpgradeClusterResponse UpgradeCluster(UpgradeClusterRequest request) {
            return  new UpgradeClusterExecutor().Client(this).Execute<UpgradeClusterResponse, UpgradeClusterResult, UpgradeClusterRequest>(request);
        }
#else
        /// <summary>
        ///  触发升级
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpgradeClusterResponse> UpgradeCluster(UpgradeClusterRequest request) {
            return await new UpgradeClusterExecutor().Client(this).Execute<UpgradeClusterResponse, UpgradeClusterResult, UpgradeClusterRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改 kubernetes 集群配额，内部接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyQuotaResponse ModifyQuota(ModifyQuotaRequest request) {
            return  new ModifyQuotaExecutor().Client(this).Execute<ModifyQuotaResponse, ModifyQuotaResult, ModifyQuotaRequest>(request);
        }
#else
        /// <summary>
        ///  修改 kubernetes 集群配额，内部接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyQuotaResponse> ModifyQuota(ModifyQuotaRequest request) {
            return await new ModifyQuotaExecutor().Client(this).Execute<ModifyQuotaResponse, ModifyQuotaResult, ModifyQuotaRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询版本信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeVersionsResponse DescribeVersions(DescribeVersionsRequest request) {
            return  new DescribeVersionsExecutor().Client(this).Execute<DescribeVersionsResponse, DescribeVersionsResult, DescribeVersionsRequest>(request);
        }
#else
        /// <summary>
        ///  查询版本信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeVersionsResponse> DescribeVersions(DescribeVersionsRequest request) {
            return await new DescribeVersionsExecutor().Client(this).Execute<DescribeVersionsResponse, DescribeVersionsResult, DescribeVersionsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  设置工作节点组的自动修复
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SetAutoRepairResponse SetAutoRepair(SetAutoRepairRequest request) {
            return  new SetAutoRepairExecutor().Client(this).Execute<SetAutoRepairResponse, SetAutoRepairResult, SetAutoRepairRequest>(request);
        }
#else
        /// <summary>
        ///  设置工作节点组的自动修复
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SetAutoRepairResponse> SetAutoRepair(SetAutoRepairRequest request) {
            return await new SetAutoRepairExecutor().Client(this).Execute<SetAutoRepairResponse, SetAutoRepairResult, SetAutoRepairRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  设置工作节点组自动扩容
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SetNodeGroupCAResponse SetNodeGroupCA(SetNodeGroupCARequest request) {
            return  new SetNodeGroupCAExecutor().Client(this).Execute<SetNodeGroupCAResponse, SetNodeGroupCAResult, SetNodeGroupCARequest>(request);
        }
#else
        /// <summary>
        ///  设置工作节点组自动扩容
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SetNodeGroupCAResponse> SetNodeGroupCA(SetNodeGroupCARequest request) {
            return await new SetNodeGroupCAExecutor().Client(this).Execute<SetNodeGroupCAResponse, SetNodeGroupCAResult, SetNodeGroupCARequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询 kubernetes 集群配额
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeQuotasResponse DescribeQuotas(DescribeQuotasRequest request) {
            return  new DescribeQuotasExecutor().Client(this).Execute<DescribeQuotasResponse, DescribeQuotasResult, DescribeQuotasRequest>(request);
        }
#else
        /// <summary>
        ///  查询 kubernetes 集群配额
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeQuotasResponse> DescribeQuotas(DescribeQuotasRequest request) {
            return await new DescribeQuotasExecutor().Client(this).Execute<DescribeQuotasResponse, DescribeQuotasResult, DescribeQuotasRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  添加集群的网络配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddClusterNetworkDetailResponse AddClusterNetworkDetail(AddClusterNetworkDetailRequest request) {
            return  new AddClusterNetworkDetailExecutor().Client(this).Execute<AddClusterNetworkDetailResponse, AddClusterNetworkDetailResult, AddClusterNetworkDetailRequest>(request);
        }
#else
        /// <summary>
        ///  添加集群的网络配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddClusterNetworkDetailResponse> AddClusterNetworkDetail(AddClusterNetworkDetailRequest request) {
            return await new AddClusterNetworkDetailExecutor().Client(this).Execute<AddClusterNetworkDetailResponse, AddClusterNetworkDetailResult, AddClusterNetworkDetailRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  移除集群的网络配置，只支持 node 子网移除
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public RemoveClusterNetworkDetailResponse RemoveClusterNetworkDetail(RemoveClusterNetworkDetailRequest request) {
            return  new RemoveClusterNetworkDetailExecutor().Client(this).Execute<RemoveClusterNetworkDetailResponse, RemoveClusterNetworkDetailResult, RemoveClusterNetworkDetailRequest>(request);
        }
#else
        /// <summary>
        ///  移除集群的网络配置，只支持 node 子网移除
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<RemoveClusterNetworkDetailResponse> RemoveClusterNetworkDetail(RemoveClusterNetworkDetailRequest request) {
            return await new RemoveClusterNetworkDetailExecutor().Client(this).Execute<RemoveClusterNetworkDetailResponse, RemoveClusterNetworkDetailResult, RemoveClusterNetworkDetailRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询单个工作节点组详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeNodeGroupResponse DescribeNodeGroup(DescribeNodeGroupRequest request) {
            return  new DescribeNodeGroupExecutor().Client(this).Execute<DescribeNodeGroupResponse, DescribeNodeGroupResult, DescribeNodeGroupRequest>(request);
        }
#else
        /// <summary>
        ///  查询单个工作节点组详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeNodeGroupResponse> DescribeNodeGroup(DescribeNodeGroupRequest request) {
            return await new DescribeNodeGroupExecutor().Client(this).Execute<DescribeNodeGroupResponse, DescribeNodeGroupResult, DescribeNodeGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询集群操作进度
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeProgressResponse DescribeProgress(DescribeProgressRequest request) {
            return  new DescribeProgressExecutor().Client(this).Execute<DescribeProgressResponse, DescribeProgressResult, DescribeProgressRequest>(request);
        }
#else
        /// <summary>
        ///  查询集群操作进度
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeProgressResponse> DescribeProgress(DescribeProgressRequest request) {
            return await new DescribeProgressExecutor().Client(this).Execute<DescribeProgressResponse, DescribeProgressResult, DescribeProgressRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  - 创建网络定制化集群
        /// - 证书
        ///   - 关于kubernetes的证书，默认生成，不需要用户传入。
        /// - nodegroup
        ///   - cluster必须与nodeGroup进行绑定
        ///   - cluster支持多nodegroup
        ///   - 状态
        ///     - pending,reconciling,deleting状态不可以操作更新接口
        ///     - running，running_with_error状态可以操作nodegroup所有接口
        ///     - error状态只可以查询，删除
        ///     - delete状态的cluster在十五分钟内可以查询，十五分钟后无法查询到
        /// - 状态限制
        ///   - pending,reconciling,deleting状态不可以操作更新接口
        ///   - running状态可以操作cluster所有接口
        ///   - error状态只可以查询，删除
        ///   - delete状态的cluster在十五分钟内可以查询，十五分钟后无法查询到
        /// 
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateCustomizedClusterResponse CreateCustomizedCluster(CreateCustomizedClusterRequest request) {
            return  new CreateCustomizedClusterExecutor().Client(this).Execute<CreateCustomizedClusterResponse, CreateCustomizedClusterResult, CreateCustomizedClusterRequest>(request);
        }
#else
        /// <summary>
        ///  - 创建网络定制化集群
        /// - 证书
        ///   - 关于kubernetes的证书，默认生成，不需要用户传入。
        /// - nodegroup
        ///   - cluster必须与nodeGroup进行绑定
        ///   - cluster支持多nodegroup
        ///   - 状态
        ///     - pending,reconciling,deleting状态不可以操作更新接口
        ///     - running，running_with_error状态可以操作nodegroup所有接口
        ///     - error状态只可以查询，删除
        ///     - delete状态的cluster在十五分钟内可以查询，十五分钟后无法查询到
        /// - 状态限制
        ///   - pending,reconciling,deleting状态不可以操作更新接口
        ///   - running状态可以操作cluster所有接口
        ///   - error状态只可以查询，删除
        ///   - delete状态的cluster在十五分钟内可以查询，十五分钟后无法查询到
        /// 
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateCustomizedClusterResponse> CreateCustomizedCluster(CreateCustomizedClusterRequest request) {
            return await new CreateCustomizedClusterExecutor().Client(this).Execute<CreateCustomizedClusterResponse, CreateCustomizedClusterResult, CreateCustomizedClusterRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  检查集群网络配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ValidateNetworkConfigResponse ValidateNetworkConfig(ValidateNetworkConfigRequest request) {
            return  new ValidateNetworkConfigExecutor().Client(this).Execute<ValidateNetworkConfigResponse, ValidateNetworkConfigResult, ValidateNetworkConfigRequest>(request);
        }
#else
        /// <summary>
        ///  检查集群网络配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ValidateNetworkConfigResponse> ValidateNetworkConfig(ValidateNetworkConfigRequest request) {
            return await new ValidateNetworkConfigExecutor().Client(this).Execute<ValidateNetworkConfigResponse, ValidateNetworkConfigResult, ValidateNetworkConfigRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询节点版本
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeNodeVersionResponse DescribeNodeVersion(DescribeNodeVersionRequest request) {
            return  new DescribeNodeVersionExecutor().Client(this).Execute<DescribeNodeVersionResponse, DescribeNodeVersionResult, DescribeNodeVersionRequest>(request);
        }
#else
        /// <summary>
        ///  查询节点版本
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeNodeVersionResponse> DescribeNodeVersion(DescribeNodeVersionRequest request) {
            return await new DescribeNodeVersionExecutor().Client(this).Execute<DescribeNodeVersionResponse, DescribeNodeVersionResult, DescribeNodeVersionRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  回滚未升级完的工作节点组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public RollbackNodeGroupUpgradeResponse RollbackNodeGroupUpgrade(RollbackNodeGroupUpgradeRequest request) {
            return  new RollbackNodeGroupUpgradeExecutor().Client(this).Execute<RollbackNodeGroupUpgradeResponse, RollbackNodeGroupUpgradeResult, RollbackNodeGroupUpgradeRequest>(request);
        }
#else
        /// <summary>
        ///  回滚未升级完的工作节点组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<RollbackNodeGroupUpgradeResponse> RollbackNodeGroupUpgrade(RollbackNodeGroupUpgradeRequest request) {
            return await new RollbackNodeGroupUpgradeExecutor().Client(this).Execute<RollbackNodeGroupUpgradeResponse, RollbackNodeGroupUpgradeResult, RollbackNodeGroupUpgradeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  终止升级
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AbortUpgradeResponse AbortUpgrade(AbortUpgradeRequest request) {
            return  new AbortUpgradeExecutor().Client(this).Execute<AbortUpgradeResponse, AbortUpgradeResult, AbortUpgradeRequest>(request);
        }
#else
        /// <summary>
        ///  终止升级
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AbortUpgradeResponse> AbortUpgrade(AbortUpgradeRequest request) {
            return await new AbortUpgradeExecutor().Client(this).Execute<AbortUpgradeResponse, AbortUpgradeResult, AbortUpgradeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询可升级的控制节点版本
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeUpgradableMasterVersionsResponse DescribeUpgradableMasterVersions(DescribeUpgradableMasterVersionsRequest request) {
            return  new DescribeUpgradableMasterVersionsExecutor().Client(this).Execute<DescribeUpgradableMasterVersionsResponse, DescribeUpgradableMasterVersionsResult, DescribeUpgradableMasterVersionsRequest>(request);
        }
#else
        /// <summary>
        ///  查询可升级的控制节点版本
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeUpgradableMasterVersionsResponse> DescribeUpgradableMasterVersions(DescribeUpgradableMasterVersionsRequest request) {
            return await new DescribeUpgradableMasterVersionsExecutor().Client(this).Execute<DescribeUpgradableMasterVersionsResponse, DescribeUpgradableMasterVersionsResult, DescribeUpgradableMasterVersionsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  设置自动升级
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SetAutoUpgradeResponse SetAutoUpgrade(SetAutoUpgradeRequest request) {
            return  new SetAutoUpgradeExecutor().Client(this).Execute<SetAutoUpgradeResponse, SetAutoUpgradeResult, SetAutoUpgradeRequest>(request);
        }
#else
        /// <summary>
        ///  设置自动升级
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SetAutoUpgradeResponse> SetAutoUpgrade(SetAutoUpgradeRequest request) {
            return await new SetAutoUpgradeExecutor().Client(this).Execute<SetAutoUpgradeResponse, SetAutoUpgradeResult, SetAutoUpgradeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  - 创建集群
        /// - 证书
        ///   - 关于kubernetes的证书，默认生成，不需要用户传入。
        /// - nodegroup
        ///   - cluster必须与nodeGroup进行绑定
        ///   - cluster支持多nodegroup
        ///   - 状态
        ///     - pending,reconciling,deleting状态不可以操作更新接口
        ///     - running，running_with_error状态可以操作nodegroup所有接口
        ///     - error状态只可以查询，删除
        ///     - delete状态的cluster在十五分钟内可以查询，十五分钟后无法查询到
        /// - 状态限制
        ///   - pending,reconciling,deleting状态不可以操作更新接口
        ///   - running状态可以操作cluster所有接口
        ///   - error状态只可以查询，删除
        ///   - delete状态的cluster在十五分钟内可以查询，十五分钟后无法查询到
        /// 
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateClusterResponse CreateCluster(CreateClusterRequest request) {
            return  new CreateClusterExecutor().Client(this).Execute<CreateClusterResponse, CreateClusterResult, CreateClusterRequest>(request);
        }
#else
        /// <summary>
        ///  - 创建集群
        /// - 证书
        ///   - 关于kubernetes的证书，默认生成，不需要用户传入。
        /// - nodegroup
        ///   - cluster必须与nodeGroup进行绑定
        ///   - cluster支持多nodegroup
        ///   - 状态
        ///     - pending,reconciling,deleting状态不可以操作更新接口
        ///     - running，running_with_error状态可以操作nodegroup所有接口
        ///     - error状态只可以查询，删除
        ///     - delete状态的cluster在十五分钟内可以查询，十五分钟后无法查询到
        /// - 状态限制
        ///   - pending,reconciling,deleting状态不可以操作更新接口
        ///   - running状态可以操作cluster所有接口
        ///   - error状态只可以查询，删除
        ///   - delete状态的cluster在十五分钟内可以查询，十五分钟后无法查询到
        /// 
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateClusterResponse> CreateCluster(CreateClusterRequest request) {
            return await new CreateClusterExecutor().Client(this).Execute<CreateClusterResponse, CreateClusterResult, CreateClusterRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询服务配置信息，提供详细的 master 和 node 镜像信息。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeImagesResponse DescribeImages(DescribeImagesRequest request) {
            return  new DescribeImagesExecutor().Client(this).Execute<DescribeImagesResponse, DescribeImagesResult, DescribeImagesRequest>(request);
        }
#else
        /// <summary>
        ///  查询服务配置信息，提供详细的 master 和 node 镜像信息。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeImagesResponse> DescribeImages(DescribeImagesRequest request) {
            return await new DescribeImagesExecutor().Client(this).Execute<DescribeImagesResponse, DescribeImagesResult, DescribeImagesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询单个集群详情。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeClusterResponse DescribeCluster(DescribeClusterRequest request) {
            return  new DescribeClusterExecutor().Client(this).Execute<DescribeClusterResponse, DescribeClusterResult, DescribeClusterRequest>(request);
        }
#else
        /// <summary>
        ///  查询单个集群详情。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeClusterResponse> DescribeCluster(DescribeClusterRequest request) {
            return await new DescribeClusterExecutor().Client(this).Execute<DescribeClusterResponse, DescribeClusterResult, DescribeClusterRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改集群的 名称 和 描述。&lt;br&gt;集群 name 和 description 必须要指定一个
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyClusterResponse ModifyCluster(ModifyClusterRequest request) {
            return  new ModifyClusterExecutor().Client(this).Execute<ModifyClusterResponse, ModifyClusterResult, ModifyClusterRequest>(request);
        }
#else
        /// <summary>
        ///  修改集群的 名称 和 描述。&lt;br&gt;集群 name 和 description 必须要指定一个
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyClusterResponse> ModifyCluster(ModifyClusterRequest request) {
            return await new ModifyClusterExecutor().Client(this).Execute<ModifyClusterResponse, ModifyClusterResult, ModifyClusterRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询集群列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeClustersResponse DescribeClusters(DescribeClustersRequest request) {
            return  new DescribeClustersExecutor().Client(this).Execute<DescribeClustersResponse, DescribeClustersResult, DescribeClustersRequest>(request);
        }
#else
        /// <summary>
        ///  查询集群列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeClustersResponse> DescribeClusters(DescribeClustersRequest request) {
            return await new DescribeClustersExecutor().Client(this).Execute<DescribeClustersResponse, DescribeClustersResult, DescribeClustersRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询集群的网络配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeClusterNetworkResponse DescribeClusterNetwork(DescribeClusterNetworkRequest request) {
            return  new DescribeClusterNetworkExecutor().Client(this).Execute<DescribeClusterNetworkResponse, DescribeClusterNetworkResult, DescribeClusterNetworkRequest>(request);
        }
#else
        /// <summary>
        ///  查询集群的网络配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeClusterNetworkResponse> DescribeClusterNetwork(DescribeClusterNetworkRequest request) {
            return await new DescribeClusterNetworkExecutor().Client(this).Execute<DescribeClusterNetworkResponse, DescribeClusterNetworkResult, DescribeClusterNetworkRequest>(request).ConfigureAwait(false);
        }
#endif

            /// <summary>
            ///  默认KubernetesClient 构造器 接口
            ///</summary>
            public interface Builder
            {

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>kubernetesClient 构造器</returns>
                Builder CredentialsProvider(CredentialsProvider provider);

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>kubernetesClient 构造器</returns>
                Builder Environment(Core.Client.SDKEnvironment environment);

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>kubernetesClient 构造器</returns>
                Builder HttpRequestConfig(HttpRequestConfig config);

                /// <summary>
                ///  构造KubernetesClient 对象
                ///</summary>
                KubernetesClient Build();
            }

            /// <summary>
            ///  默认KubernetesClient 构造器
            ///</summary>
            public class DefaultBuilder : Builder
            {
                /// <summary>
                ///  KubernetesClient service client
                /// </summary>
                private  KubernetesClient kubernetesClient;

                /// <summary>
                ///  默认KubernetesClient 构造器构造对象
                ///</summary>
                public DefaultBuilder()
                {
                    kubernetesClient = new KubernetesClient();
                }

                /// <summary>
                ///  构造KubernetesClient 对象
                ///</summary>
                public KubernetesClient Build()
                {
                    if (kubernetesClient.CredentialsProvider == null)
                    {
                        //if credentialsProvider not set, try load jdcloud global default  credentials provider
                        kubernetesClient.credentialsProvider = JdCloud.DefaultInstance.GetCredentialsProvider();
                        if (kubernetesClient.credentialsProvider == null)
                        {
                            throw new ArgumentNullException("KubernetesClient build error: jdcloud credentials provider not set");
                        }
                    }
                    if (kubernetesClient.HttpRequestConfig == null)
                    {
                        kubernetesClient.httpRequestConfig = JdCloud.DefaultInstance.GetHttpRequestConfig();
                        if (kubernetesClient.httpRequestConfig == null)
                        {
                        throw new ArgumentNullException("KubernetesClient build error: http request config not set");
                        }
                    }
                    return kubernetesClient;
                }

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>kubernetesClient 构造器</returns>
                public Builder CredentialsProvider(CredentialsProvider provider)
                {
                    kubernetesClient.credentialsProvider = provider;
                    return this;
                }

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>kubernetesClient 构造器</returns>
                public Builder Environment(SDKEnvironment environment)
                {
                    kubernetesClient.environment = environment;
                    return this;
                }

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>kubernetesClient 构造器</returns>
                public Builder HttpRequestConfig(HttpRequestConfig config)
                {
                    kubernetesClient.httpRequestConfig = config;
                    return this;
                }
            }
    }
}
